<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绝对位置</title>
    <style>
        .parent{
            width: 300px;
            height: 300px;
            border:5px solid aqua;
            margin: 0 auto;
            position: relative;
        }
        .parent>div{
            width: 100px;
            height: 100px;
            background-color: red;
            /*position: relative;*/
            position: absolute;
            top: 20px;
            right:20px;

            /*right:200px;*/
            /*bottom: 0px;*/
        }
    </style>
</head>
<body>
<div class="parent">
    <div></div>
</div>
</body>
</html>